import Vue from 'vue'

const context = require.context('./', true, /\.js$/)
const httpArr = []

context
	.keys()
	.filter(p => p != './index.js')
	.forEach(path => httpArr.push(context(path).default))

/**
 * 把所有的请求封装成一个对象
 */
Vue.prototype.$http = Object.assign(...httpArr)
